<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
                <title></title>

        <meta name="keywords" content=""/>

        <meta name="description" content="" />
        <script type="text/javascript" src="__PUBLIC__/Js/jquery-1.8.3.min.js"></script>
        <link href="__PUBLIC__/Home/qiehuan/css/style.css" rel="stylesheet" />
        <script type="text/javascript" src="__PUBLIC__/Home/qiehuan/js/jquery.js"></script>
        <script type="text/javascript" src="__PUBLIC__/Home/qiehuan/js/jquery.SuperSlide.js"></script>
    

        <link href="__PUBLIC__/Home/Css/style.css" rel="stylesheet" type="text/css">
        <script> var BAO_PUBLIC = '/Public'; var BAO_ROOT = '';</script>
       <!-- <script src="__PUBLIC__/Home/Scripts/jquery.js"></script> --> 
        <script src="__PUBLIC__/Home/Scripts/layer.js"></script>
        <script src="__PUBLIC__/Home/Scripts/jquery.flexslider-min.js"></script>
        <script src="__PUBLIC__/Home/Scripts/js.js"></script>
        <script src="__PUBLIC__/Home/Scripts/web.js"></script>
        <script src="__PUBLIC__/Home/Scripts/baocms.js"></script>
   
        
    </head>

    <body>
        <iframe id="baocms_frm" name="baocms_frm" style="display:none;"></iframe> 
<div class="topOne">
    <div class="nr">
         <?php if(session('member_id')):?>
        <div class="left">您好，<?php echo session('member_name');?>欢迎访问生活美食网
        <a href="<?php echo U('Login/loginout')?>">退出</a>
        <?php else:?>
                   你好 欢迎访问生活美食网
        <a href="<?php echo U('Login/login');?>" class="on">登陆</a>|
        <a href="<?php echo U('Login/regist');?>">注册</a>
        <?php endif;?>
      
        
    </div>
    <div class="right">
        <ul>
            <li class="liOne"><a class="liOneB" href="" >我的订单</a></li>
            <li class="liOne"><a class="liOneA" href="javascript:void(0);">我的服务<em>&nbsp;</em></a>
                <div class="list">
                    <ul>
                        <li><a href="l">我的订单</a></li>
                        <li><a href="">我的外卖</a></li>
                        <li><a href="">我的预约</a></li>
                        <li><a href="">我的评价</a></li>
                        <li><a href="">我的收藏</a></li>                                    
                        <li><a href="">我的活动</a></li>
                        <li><a href="">会员服务</a></li>
                        <li><a href="">帐号设置</a></li>

                    </ul>
                </div>
            </li>
            <span>|</span>
            <li class="liOne liOne_visit"><a class="liOneA" href="javascript:void(0);">最近浏览<em>&nbsp;</em></a>
                <div class="list liOne_visit_pull">
                    <ul>
                                            <p class="empty">您还没有浏览记录</p>
                                    </div>
            </li>

            <!-- <span>|</span> -->
            <li class="liOne"> <!-- <a class="liOneA" href="javascript:void(0);">我是商家<em>&nbsp;</em></a> -->
               
            </li>
            <span>|</span>
            <li class="liOne"> <a class="liOneA" href="javascript:void(0);">快捷导航<em>&nbsp;</em></a>
                <div class="list">
                    <ul>

                        <li><a href=""  >活动</a></li>
                        <li><a href=""  >同城信息</a></li>
                        <li><a href=""  >优惠券</a></li>
                        <li><a href=""  >积分商城</a></li>
                        <li><a href=""  >贴吧</a></li>
                        <li><a href=""  >商家榜单</a></li>
                        <li><a href=""  >商家新闻</a></li>
                        <li><a href=""  >一元云购</a></li>
                        <li><a href=""  >文章资讯</a></li>
                        <li><a href=""  >部落</a></li>              

                    </ul>
                </div>
            </li>
        </ul>
    </div>
</div>

</div>
<script>
    $(document).ready(function(){
        $("#emptyhistory").click(function(){
            $.get("/tuan/emptyviews.html",function(data){
                if(data.status == 'success'){
                    $(".liOne_visit_pull ul li").remove();
                    $(".liOne_visit_pull p.empty").html("您还没有浏览记录");
                }else{
                    layer.msg(data.msg,{icon:2});
                }
            },'json')

            //$.cookie('views', '', { expires: -1 }); 
            //$(".liOne_visit_pull ul li").remove();
            //$(".liOne_visit_pull p.empty").html("您还没有浏览记录");
        })
    });
</script>   
<div class="topTwo">
    <div class="left">

        <h1><a href="/index/index.html"><img src="__PUBLIC__/Home/Picture/5.jpg" width="200" height="76" /></a></h1>
             
        <div class="changeCity">
            <p class="changeCity_name">上海</p>
            <a href="" class="graycl changeCity_link">更换城市</a>

        </div>
    </div>
    <div class="left searchBox_r">
    <script>
		$(document).ready(function () {
			$(".selectList li a").click(function () {
				$("#search_form").attr('action', $(this).attr('rel'));
				$("#selectBoxInput").html($(this).html());
				$('.selectList').hide();
			});
			$(".selectList a").each(function(){
				if($(this).attr("cur")){
					$("#search_form").attr('action', $(this).attr('rel'));
					$("#selectBoxInput").html($(this).html());                                
				}
			})
		});
	</script>
        <div class="searchBox">

        	<form id="search_form"  method="post" action="">

            <div class="selectBox"> <span class="select"  id="selectBoxInput">商家</span>
                <div  class="selectList">
                    <ul>
                        <li><a href="javascript:void(0);"  rel="/shop/index.html">商家</a></li>
                        <li><a href="javascript:void(0);" rel="/tuan/index.html">抢购</a></li>
                        <li><a href="javascript:void(0);" rel="/life/index.html">生活</a></li>
                        <li><a href="javascript:void(0);" rel="/mall/index.html">商品</a></li>
                        <li><a href="javascript:void(0);" rel="/ding/index.html">订座</a></li>
                    </ul>
                </div>
            </div>
            <input type="text" class="text" name="keyword" value="输入您要搜索的内容" onclick="if (value == defaultValue) {
                        value = '';
                        this.style.color = '#000'
                    }"  onBlur="if (!value) {
                                value = defaultValue;
                                this.style.color = '#999'
                            }" />
            <input type="submit" class="submit" value="搜索" />
            </form>
        </div>


    </div>
    <div class="topTwo_cart_box right" id='cart'><em class="ico"></em>购物车
        <div class="topTwo_cart_list_box">
            <div class="box"  id='cart_show'>
                
                   
               
            </div>
        </div>
    </div>
    <div class="clear"></div>
</div>
<script>
/* $('#cart').hover(function(){
	 var link = "/mall/goods.html";
	$("#cart_show").load(link); 
}); */
$("#cart").mouseover(function(){

	$.ajax({
		type:'get',
		dataType:'json',
		url:"<?php echo U('cart/ajaxCartlist');?>",
		success:function(data){
			//拼出html
			//alert(data);
			var html = "<table>";
			$(data).each(function(k,v){
				//alert(v.goods_name);
				html +="<tr width=50>";
			
				html +="<td>"+v.goods_name+"</td>";
				html +="</tr>";
			});
			html += "</table>";
			//alert(html);
			$("#cart_show").html(html);
		
		
		}
		
	})
});
</script>



<?php 
$catemodel = D('Admin/category');
$catedata = $catemodel->getNavData();

?>

<div class="nav mb10">
    <div class="navList">
        <ul>
        	<li class="navListAll">全部分类</li>

            <li class="navLi"><a class="navA" title="首页" href="<?php U('index'); ?>"  >首页</a></li>
            <?php  foreach($catedata as $k=>$v) : ?>
            <li class="navLi"><a class="navA" title="<?php echo $v['cat_name']; ?>" href=""  ><?php echo $v['cat_name']; ?></a></li>  
            <?php endforeach; ?>             
        </ul> 

    </div>
</div>
<div class="clear"></div>
<script type="text/javascript">
    $(document).ready(function () {
        $('.sy_flexslider').flexslider({
            directionNav: true,
            pauseOnAction: false
        });
		
		$('.sy_buy_flexslider').flexslider({
            directionNav: true,
            pauseOnAction: false,
			controlNav:false,
        });
		
        $('.sy_waimai_flexslider').flexslider({
            directionNav: true,
            pauseOnAction: false
        });
    });//首页轮播js

    $(function () {
        

        $(".syShop_tab.left a").each(function (e) {

            $(this).mouseover(function (event) {
                $(this).parent().find("a").removeClass("on");
                $(this).addClass("on");
                $(".syShop_list_box .syShop_list").each(function (i) {
                    if (e == i)
                    {
                        $(this).parent().find(".syShop_list").hide();
                        $(this).show();
                    }
                    else {
                        $(this).hide();
                    }
                });
            });
        });//首页本地商城部分结束
        $(".cityInfor_tab i").each(function (e) {
            $(this).mouseover(function (event) {
                $(this).parent().find("i").removeClass("on");
                $(this).addClass("on");
                $(".cityInfor_nr .cityInfor_list").each(function (i) {
                    if (e == i)
                    {
                        $(this).parent().find(".cityInfor_list").hide();
                        $(this).show();
                    }
                    else {
                        $(this).hide();
                    }
                });
            });
        });//首页同城信息部分结
        $(".sy_seatSwitch_tab li").each(function (e) {
            $(this).mouseover(function (event) {
                $(this).parent().find("li").removeClass("on");
                $(this).addClass("on");
                $(".sy_seatSwitch_box .sy_seatSwitch1").each(function (i) {
                    if (e == i)
                    {
                        $(this).parent().find(".sy_seatSwitch1").hide();
                        $(this).show();
                    }
                    else {
                        $(this).hide();
                    }
                });
            });
        });//首页订座部分结
        
    });
</script>



<!--首页第一部分开始-->
<div class="sy_partOne">
	<div class="left sy_partOne_cate"><div class="menu_fllist2">
                 
           
         <?php foreach($catedata as $k=>$v):?>
        <div class="item2" >
        
            <h3>
              
                <div class="left ico ico_2"></div>
                <div class="wz">

                	<a class="bt1" title="<?php echo $v['cat_name'];?>"  href=""><?php echo $v['cat_name'];?></a>
                	
                 
                </div>
                <div class="clear"></div>
            </h3>
         
            <div class="menu_flklist2">
                <?php foreach($v['children'] as $k1=>$v1) :?>
                <div class="menu_fl2t">

                	<a title="<?php echo $v1['cat_name'];?>"><?php echo $v1['cat_name'];?></a>
                </div>
                
                <div class="menu_fl2nr">
                    <?php foreach ($v1['children'] as $k2=>$v2):?> 
                    <a href="<?php echo U('index/goods?id='.$v2['id']); ?>"><?php echo $v2['cat_name'];?></a>   
                    <?php endforeach;?>

                </div>
               
            <?php endforeach;?>
            </div>
          
        
        </div>
        <?php endforeach;?>

        </div>
        </div>
</div>
    <div class="right sy_partOne_r">

        <div class="sy_flexslider" style="margin-left:-60px">
            <ul class="slides">
                <li class="list" >
                    <a  href=""><img src="__PUBLIC__/Images/1.jpg" style="width:950px;height:440px;" /></a>
                </li> 
                <li class="list">
                    <a  href=""><img src="__PUBLIC__/Images/2.jpg" style="width:950px;height:440px;" /></a>
                </li>
                <li class="list">
                    <a  href=""><img src="__PUBLIC__/Images/3.jpg" style="width:950px;height:440px;" /></a>
                </li>             
            </ul>
        </div>
        

    </div>
    <div class="clear"></div>
</div>
<!--首页第一部分结束-->
<div class="pagewd" id="index-gun">
    <!--首页抢购部分开始-->
    <div class="sy_FloorBt" data="top_1" id="floor1" style="border-bottom:none;">
        <div class="left sy_FloorBtz"><i class="ico_1"></i><span class="bt cl_1">限时抢购</span>
            <script type="text/javascript" language="javascript">
                var t1 = 5*3600*1000;
                
                    setInterval(function () {
                        if(t1>0){
                        t1-=1000;
                       // alert(t1);
                       var str = '<span class="spxq_qgTimezt spxq_qgTimejx">&nbsp;</span>';
                        var d1 = Math.floor(t1 / 1000 / 60 / 60 / 24);
                        var h1 = Math.floor(t1 / 1000 / 60 / 60 % 24);
                        var m1 = Math.floor(t1 / 1000 / 60 % 60);
                        var s1 = Math.floor(t1 / 1000 % 60);
                        //alert(d1);
                        //if (d1 > 30 || t1 < 11) {
                           // $('#s1').hide();
                       // }

                        if (d1 < 10) {
                            str+='<span>0'+d1+'</span>天';

                        } else {
                           str+='<span>'+d1+'</span>天';
                        }
                        if (h1 < 10) {
                            str+='<span>0'+h1+'</span>时';
                        } else {
                           str+='<span>'+h1+'</span>时';
                        }
                        if (m1 < 10) {
                           str+='<span>0'+m1+'</span>分';
                        } else {
                            str+='<span>'+m1+'</span>分';
                        }
                        if (s1 < 10) {
                            str+='<span>0'+s1+'</span>秒';

                        } else {
                           str+='<span>'+s1+'</span>秒';
                        }
                    }
                        $("#s1").html(str);
                    }, 1000);
            </script>
            <span class="radius3 spxq_qgTime" style="margin-left:0;" id="s1"></span>
        </div>

        <!--<div class="right"><a  title="更多抢购"   href="/tuan/index.html">更多&gt;&gt;</a></div>-->

    </div>
    <div class="sy_buy_nr">
    	<div class="sy_buy_flexslider">
        	<ul class="slides">
                                </ul>
        </div>
    </div>

     <div class="clear"></div>
    </div>
    <!--首页抢购部分结束-->
  

    
    <!--首页外卖部分开始-->
    <?php  foreach($goodsfloorData  as $k=>$v):?>
    <div class="sy_FloorBt" data="top_3" id="floor3">
        <div class="left sy_FloorBtz"><i class="ico_3"></i><span class="bt cl_2"><?php echo $v['cat_name'];?></span></div>

        <!-- <div class="right"><a   href="/ele/index.html">更多&gt;&gt;</a></div> -->

    </div>
    <div class="sy_waimai_nr">
       
    	<div class="sy_waimai_one">
    	
        	<div class="left sy_waimai_cate">
        	
            	<div class="sy_waimai_cate_list">

                    <?php foreach ($v['subcategory'] as $k1=>$v1):?>
                    <a href="<?php echo U('index/goods?id='.$v['id']);?>" class="list"><?php echo $v1['cat_name'];?></a>  
                    <?php endforeach;?>

                </div>
               
            </div>
          
            <div class="www360buy" style='width:1000px; margin-left:250px; margin-top:10px;'>
                  
           <div class="hd" style='width:1000px; '>
            <?php foreach ($v['getcategory'] as $k2=>$v2) :?>  
           <ul style='width:800px;'>
        
		        <li class="<?php if($k2==0) echo 'class=on';?>" style='width:145px;'><?php echo $v2['cat_name'];?></li>
		       <!--  <li class=" "style='width:145px;'>猜您喜欢</li>
		        <li class=" "style='width:145px;'>热卖商品</li>
		        <li class=" "style='width:145px;'>热评商品</li>
		        <li class="" style='width:145px;'>新品上架</li> -->
		           
		  </ul>
         <?php endforeach;?>  
</div>
<div class="bd">


 <?php foreach($v['getcategory'] as $k3=>$v3):?>
<ul class="lh" style="display: none;">




 <?php foreach($v3['goods'] as $k4=>$v4):?>
	<li>
	  

		<div class="p-img ld"><a href="<?php echo U('index/goods?id='.$v4['id']);?>"><img src="__PUBLIC__/Uploads/<?php echo $v4['sm_logo'];?>" width='120' height='120'></a> </div>
		<div class="p-name"><a href="#"><p style='margin:10px 10px;'><?php echo $v4['goods_name'];?></p></a></div>
		<div class="p-price">本店价：<strong><?php echo $v4['shop_price'];?></strong></div>

	
	</li>

<?php endforeach;?>


</ul>
<?php endforeach;?>
<script type="text/javascript">jQuery(".www360buy").slide({delayTime:0 });</script>


</div>

  <div class="clear"></div>
  
    </div>
    <?php endforeach;?>

   

</div>

<script>
    $(function () {
        $("#fox-food li").each(function (e) {
            $(this).click(function (event) {
                $(".radius3").each(function (i) {
                    if (e == i)
                    {
                        $("html,body").animate({scrollTop: $(this).offset().top}, 500);
                        event.preventDefault();
                    }
                });
            });
        });
    });

    $(document).ready(function () {
        $(window).scroll(function () {
            var top = $(document).scrollTop();          //定义变量，获取滚动条的高度
            var menu = $("#fox-food");                      //定义变量，抓取#menu
            var items = $("#index-gun").find(".sy_FloorBt");    //定义变量，查找.item

            var curId = "";                             //定义变量，当前所在的楼层item #id 

            items.each(function () {
                var m = $(this);                        //定义变量，获取当前类
                var itemsTop = m.offset().top;        //定义变量，获取当前类的top偏移量
                if (top > itemsTop - 300) {
                    curId = "#" + m.attr("id");
                } else {
                    return false;
                }
            });

            //给相应的楼层设置cur,取消其他楼层的cur
            var curLink = menu.find(".cur");
            if (curId && curLink.attr("href") != curId) {
                curLink.removeClass("cur");
                menu.find("[href=" + curId + "]").addClass("cur");
            }
            // console.log(top);
        });
        /*控制*/
        $(window).scroll(function () {
            if ($(window).scrollTop() < 220) {
                $(".indexpop").css("top", "220px");
                $(".indexpop").css("bottom", "auto");
            }
            else {
                $(".indexpop").css("top", "40px");
                $(".indexpop").css("bottom", "auto");
            }
        });


    });
</script>
<div class="pagewd foot_security">
	<ul>
	    <li><i class="ico_1"></i>随时退</li>
        <li><i class="ico_2"></i>不满意免单</li>
        <li><i class="ico_3"></i>过期退款</li>
        <li><i class="ico_4"></i>7×24小时服务</li>
    </ul>
</div>
<div class="footerOut">
    <div class="foot_yqlj">
            友情链接：

            <a   href="">北京软件开发</a> <a   href="">软件商城</a> <a   href="">baocms</a> <a   href="">江湖家居</a>         </div>    <div class="footer">

        <div class="footNav">
            <div class="left">
                <div class="footNavLi">
                    <ul>
                    	<li class="footerLi foot_contact">
                            <h3><i class="ico_1"></i>联系我们</h3>
                			<div class="nr">
                            	<p>客服电话：<b class="fontcl3">0551-63641901</b></p>
                                <p class="graycl">免费长途</p>

                                <p>在线客服：<a   href="http://wpa.qq.com/msgrd?v=3&amp;uin=800026911&amp;site=www.baocms.cn&amp;menu=yes"><img src="__PUBLIC__/Home/Picture/foot_btn.png"/></a></p>

                                <p>工作时间：周一至周日9:00-22:00</p>
                                <p class="graycl">法定节假日除外</p>
                            </div>
                        </li>
                        <li class="footerLi">
                            <h3><i class="ico_2"></i>公司信息</h3>
                            <ul class="list">

                                <li><a   title="关于我们" href="#">关于我们</a></li>
                                <li><a   title="联系我们" href="#">联系我们</a></li>
                                <li><a   title="人才招聘" href="#">人才招聘</a></li>
                                <li><a   title="免责声明" href="#">免责声明</a></li>

                            </ul>
                        </li>
                        <li class="footerLi">
                            <h3><i class="ico_3"></i>商户合作</h3>
                            <ul class="list">
                                <li><a href="/shop/apply.html">商家入驻</a></li>

                                <li><a   title="广告合作" href="#">广告合作</a></li>
                                <li><a href="#">商家后台</a></li>

                            </ul>
                        </li>
                        <li class="footerLi">
                            <h3><i class="ico_4"></i>用户帮助</h3>
                            <ul class="list">

                                <li><a title="服务协议" href="#">服务协议</a></li>
                                <li><a title="退款承诺" href="#">退款承诺</a></li>

                            </ul>
                        </li>
                    </ul>
                </div>
              
            </div>
            <div class="right"><p>扫一扫加关注</p><img src="__PUBLIC__/Home/Picture/56a5bdd0d8af0.jpg" width="149" height="149" /></div>
        </div>
    </div>

	<div class="footerCopy">copyright 2013-2113 www.baocms.cn All Rights Reserved 生活美食网络版权所有 - 皖ICP备09014003号 </div>


</div>  
<div class="topUp">
    <ul>

    	<li class="kefu"><a   href="#"><div class="kefu_open maincl">在线客服</div></a></li>

        <li class="topBack"><div class="topBackOn">回到<br />顶部</div></li>
        <li class="topUpWx"><div class="topUpWxk"><img src="__PUBLIC__/Home/Picture/56a5bdd0d8af0.jpg" width="149" height="149" /><p class="maincl">扫描二维码关注微信</p></div></li>
    </ul>
</div>


<script>
    $(document).ready(function () {
        $(window).scroll(function () {
            if ($(window).scrollTop() > 100) {
                $(".topUp").show();
                $(".indexpop").show();
            } else {
                $(".topUp").hide();
                $(".indexpop").hide();
            }


            var ctl = "index";
            if(ctl == 'coupon'){
                if ($(window).scrollTop() > 665) {
                    $(".spxq_xqT2").show();
                } else {
                    $(".spxq_xqT2").hide();
                }
            }else{
                if ($(window).scrollTop() > '') {
                    $(".spxq_xqT2").show();
                } else {
                    $(".spxq_xqT2").hide();
                }
            }
        });
        $(".topBack").click(function () {
            $("html,body").animate({scrollTop: 0}, 200);
        });
		
		
		$(window).scroll(function(){
			var top = $(document).scrollTop();          //定义变量，获取滚动条的高度
			var menu = $(".topUp");                      //定义变量，抓取topUp
			var items = $(".footerOut");    //定义变量，查找footerOut 
	
			items.each(function(){
				var m=$(this);
				var itemsTop = m.offset().top;      //定义变量，获取当前类的top偏移量
				if(itemsTop-360 <= top-360){
					menu.css('bottom','360px');
					menu.css('top','auto');
				}else{
					menu.css('bottom','0px');
					menu.css('top','auto');
				}
			});
		});
    });
</script>
<!-- WPA Button Begin -->
<script charset="utf-8" type="text/javascript" src="__PUBLIC__/Home/Scripts/wpa.js"></script>
<!-- WPA Button End -->
</body>

</html>
<script>
$("#cart_list").mouseover(function(){
	alert('dddd');
	
});
</script>
